'use strict';

/* Directives */

var AppDirectives = angular.module('OutlerCenterApp.directives', []);

/* show/hide ionic tabs */
AppDirectives.directive('hideTabs', ["$rootScope",function($rootScope) {
	  return {
	      restrict: 'A',
	      link: function(scope, element, attributes) {
	          scope.$watch(attributes.hideTabs, function(value){
	              $rootScope.hideTabs = value;
	          });

	          scope.$on('$ionicView.beforeLeave', function() {
	              $rootScope.hideTabs = false;
	          });
	      }
	  };
	}]);

